package IO流02;

import java.io.FileOutputStream;
import java.io.IOException;

/*
字节流写数据加入异常处理,,了解
/
 */
public class FosDemo04 {
    public static void main(String[] args) {
        FileOutputStream fos=null;
        try {
             fos = new FileOutputStream("D:\\Idea\\IO流02\\fos04.txt");
            fos.write("helo".getBytes());
            fos.close();


        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if(fos!=null) {
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

        }

    }
}
